import { lazy } from "react";
import { AppOutline, MessageFill, UserOutline } from "antd-mobile-icons";
const Layout = lazy(() => import("../pages/Layout"));
const Home = lazy(() => import("../pages/Home"));
const Text = lazy(() => import("../pages/Text"));
const City = lazy(() => import("../pages/City"));
const My = lazy(() => import("../pages/My"));

export const handleHomes = [
  {
    path: "/",
    element: <Home></Home>,
    title: "首页",
    icon: <AppOutline />,
  },
  {
    path: "/text",
    element: <Text></Text>,
    title: "消息",
    icon: <MessageFill />,
  },
  {
    path: "/my",
    element: <My></My>,
    title: "我的",
    icon: <UserOutline />,
  },
];

export const routes = [
  {
    path: "/",
    element: <Layout></Layout>,
    children: handleHomes,
  },
  {
    path: "/city/:type",
    element: <City></City>,
  },
];
